Minor taking out stuff and putting into methods

done for a little while