Fixed insertStage
Added a very simple test framework