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…