Improved API, added first performance test