Improved load of scripts and styles in controllers