Cleaned code, added doxygen comments in code, HTML and PDF documentation, fixed API

Should be okay for the real 1.0.0 release!