Test framework finally working

Updated testmodule with hokey fix for a self-reference inside tests, but
everything seems to work as expected.