Various fixes

Some merged PRs from fabpot/Silex repo.