First implementation
split functions out to seperate source files
Add license, TODO and README docs