Restructure the code per https://github.com/fabpot/Silex-Skeleton/
Add tests.