Refactored to fit module pattern

So cool :8ball: