bug fixes and docs
doxygen documentation added