Added tests and building API