Code restructure + major update.

SPPModel moved to separate file. Random vectors generated each update
rather than pregenerated.