refactoring...moved generic code to defs.h all pnp resources should use
this (plant, line, module, device). So far only line and module have
been refactored.