Converted subroutines to handle a 'ooint' model rather than an array.