[REFACTOR] minor SQL and whitespaces updates to the smart proxy class
extracted name_map to a constant