Converted static module structure to be more OO with instance methods so it's easier to extend and modify