Massive file reformate and cleanup

Trust me you need this and it will make life easier.
side file correction
Merge pull request #1 from DarkGuardsman/master

Changes

Lots of cleanup and some file fixing done by Darkguardsman.