revamped check controller for better error handling, working search, minor fixes