Put the static functions into a new class. Added some comments and JavaDocs.

Next step is probably to stop using the redundant screen with both
"Scan" and "Record Results" buttons.