Refactored controller_host to reduce number of parameters