Implementing algorithm.
Implementing algorithm.
Convert references to pointers.
Re-enable code.
Model seems to work.