Alot of updates for contact implementation. Now uses classfactory to create contact definitions and have separated files into main lib and under sm module.
Fixed input format to properly define a contact definition.