Cleaned up a little.
Framework for fully and partially deteriorated calculations