Added doxygen documentation, separated implementation file.