added main controller, modified index.php
merged index.php