Move scan statuses into DB
Add unit tests
Fix reutrn value