Added main classes and implemented some methods