added the devices table to the test sql file
fixed the validation method to correctly handle system messages
Still needs a bit of work