removed deprecated code, cleaned up comments