Refactor: Moved ResultClass to it's own file. Fixed some other stuff.
Updated formatting