Refactoring

Moved testing function object into variable. Would be replaced eventually.