Added some tests and controler's test mode