Revert "Fixed scanner"

This reverts commit 104210870a95b337e4b175137d0bbc0f0ddb35b7.
Revert "added switch statement"

This reverts commit b4b36c1feb574eace57a8d0196ec4c6755a55dc6.
Attempting to revert back to before I had the switch statement