Moving unsafe queries to parameterized queries

Part 1 --