refactored individual ruby files to exist as methods in a class