Fundamental features implemented.
Needs refactoring and overall cleanup.