Improvements to controller logic