Added main function class