Combining classes and instance mode in p5js?