added dev environment index_dev.php
extracted controller functions to class
upgraded to Silex 1.2