Changes this to a module

Instead of a stand alone program, I turned this into a module to make it a bit more useful.