Initial commit:
Added the main class.
Fixed some bugs. Initial working copy.