Cleaned up code for consistency.
Defined access levels where appropriate.