Cleaned up the adding and preparing of sql statements