added more doku
removed redundant functions
cleaned up api a bit