Prepared Statements and reference cleanup.