Cleaned up scanner code. Added new test cases to testfile.src