cleaned up how code was written, still needs comments
fixed invalid variable name
Merge pull request #1 from CerebralStorm/clean_code

Clean code