Better width determination and on resize binding