Symfony optimizations

Work in progress 

@gimballock