Refactor entire project

Create useable classes, re-write comments in a standard way, make more
functional and maintainable.