refactored functions to class, moved modules to collection