Small improvements in controller