Trunk 4011

Added all required changes, including validation/support for instances where a module id may contain special characters (ex. webservices.rest)
Thank you @Rafal for all the debugging and consultation support :-)