Change class methods to instance methods, add initialize method, and change tests