some work on the web interface for first pass

also refactored process_path to be simpler for the code that uses it
and fixed a couple bugs