init

First version. Basic feature. Lots of TODOs kept in mind.