Additional safeguards in controllers against sketchy requests. Added appropriate tests.