Moved ui blocking and unblocking functions back to controller.