add console listener and do some cleanup

fix for #44

I warned you, ended up doing quite some refactoring. Both console and web requests still work in my installation (symfony 2.3).