Get rid of pointers

This does not affect speed, but it simplifies the code.