Added doxygen comments, starting to loosen types