Formatting changes
Reformatted all classes for consistency
Reorganised imports for consistency
Made code comply better with Java best practices
Set member variables to final where applicable
Replaced broad catches with specific catches
Added appropriate annotations
Small optimisation fixes