Refactored scan; added (run ps) call.