Refactored the module so that it uses the class like the state module.
Appearently you can use modules from state modules so I'm going to move
towards that in the future so that I don't have to maintain the class
in two different locations. But for now. I got the module work with the
class mostly. Before I go crazy I'm making commiting a working version.
added comments and got a few more bugs out. I'm now going to push it to salt main.