Restructured things a bit