remove sql and clean up comments