annoted code and fixed deprecated middleware unbundling