Cleaning up initial commit, reorganizing methods