Added memory management in source and updated doxygen acc.