Reordered classes and added last functions