cleaned up view -app a bit and added in allowance for trailing slashes in the url