Refactored scanner logic to other classes
Fix initial scan bug

If the app wasn't already started, the first scan was ignored.