Minor API cleanup, updated lots of comments