Refactor of core controllers