better restrict_services
* cleaner replace_injections
* renamed get_dependencies to more obvious prepare_dependencies and cleaned up inappropriate uses of it