Finished testing api. Fixed bugs.
Added init.d scripts