cleaned code up

cleaned code up as best possible to improve readability