Added updated runtest from old-typing branch
Fixed, updated, and added logical statements.