Implement a standard coding convention

Code should follow standards, and I have done a basic overhaul of the
current codebase to show this. In future, please comment your code, explain what each feature does, use Javadocs, and use plenty of returns, to help reduce code-block-ness.