Added MainFunction class