Updated All Source Code

Formatted all source files to be aligned with our coding standards.
Simplified code and removed unnecessary sections and fixed a few small
bugs.

We need to comment code.

-Mike