Better SQL validation, added basic addition of alarms