Important PR: Complete API work, adding Scala testtools, big refactoring