Cleaned up Database class and changed it to use PreparedStatements