Removed mess from index.php and add functionality to Request