Moved code related to preparing statements to the Statement class