Basic functionality complete.

TODO:
Unit tests