Rearranged and refactered some code
minor styling changes. potentially final commit for this project