Refactored functions into classes to reuse as separate files.
Last comment of the day....