Code refactoring.

Naming convention fixes.
Encapsulation fixes (not sure why things were public when they didn't need to be).
Explicit and Implicit types changes to just use implicit.
Moved embedded classes/enums to own files.