simplify rtrimming in addNamespace
remove unused variable assigned in loadMappedFile method