Changin structure to make easier to add in projects

I made some code changes to make it more simple to add as module in project, you guys could check it out and see if the changes are welcome. Great code by the way, thanks in advance