- Moved processing of user requests from "main.php" to "controller.php".
- Removed duplicated code.
- Now a recently created file is automatically open.