Better controllercheck

Also added some comments