wrap main.php inside a class and comments added