Refactor system controller