moved some methods into a module
added exception and included module
fixed required classes