[REFACTOR] minor SQL and whitespaces updates to the smart proxy class