styling changed and warnings removed