Cosmetic changes
Moving functions around
More clean up... seems to be working