Use instance methods instead of class methods

This should allow for parallelization in the future.