removed deprecated code, cleaned comments