Convert environ to BASE_DIR
Fix domain mapper