Removing direct connect calls in application controller and API logic.