Adding comments, tests, cleaning up.
Added main class to project