Setup tests in Rakefile
Document & implement API
Also add tests for API