Use instance methods instead of just class methods

This should make to easier to add related methods to the classes in the
future.