Modifying Trak module to be a class for instances