Some organizational stuff

Added spacing and other stuff, moved some variable definitions