Repaired a few bugs in the stacktests and integrated the tests to the main test