scanner cleanup. more cmdline options. add dependencies to makefile