lots of little improvements, added js tests for post requests