Refactoring

Remove unnecessary tests against unknown.
Added some var's where they should have been.
Refactored stateProcess.
Added reduce method to oldie in support of new version of stateProcess.