More changes to allow the application to work in a subdirectory.