Replaced uses of java.sql.Statement with PreparedStatement for security improvements.