REFACTOR: code style + prepare statements