Initial commit

TODO: Add tests, documentation, deal with compiler warnings, etc