More semantic checking

Updated comments in names.h
Check device names are unique.
Check connection input and output devices are defined