Minor fixes in code layout and comments + bugfix: width on resize