Renamed several functions and classes and improved documentation