Move calculation of k model into function to assist with garbage collection.
Whitespace.