Simplifying controller logic