Added new test case. Added fix for isRunning property. Added fix for ascii mode. Removed redundant if cases