refactored retrieval of markup info - let the caller handle missing markup
if trailing slash missing and page markup has not been found, try appending slash and do permanent redirect (if found). otherwise throw exception
refactored name of some globals + added new globals to configure PROD/DEV environment