Refactor the modules

Some modules were just single method namespaces. Cleaned up all modules and introduced new objects.