Added code for main testing tool