return last scanned token if possible
code cleanup, removed unused files