Clean controller code