Refactor classes and functions to standard. AP-35