Completed API docs, improved in-browser test cases, some bugfixes