Formatted classes and cleaned up code a bit