Finished essential functionality

May be bugs, will squash later