Major modifications to handle the external configuration web page

Also includes various smaller changes and bug-fixes that got handled along the way.
Sorry for not making separate commits.