remove some dead code and fix priority with creating/rendering events