Bulk of functionality added

Untested