Creating reusable controllers