Refactored API, deprecated old functionality [#41][Close #50]