Add license, comments.

Adds boilerplate for the BSD license, and some Doxygen/JavaDoc comments
for class methods and members.