More changes to allow application to run in a subdirectory.