Improved organization

Separated out some methods