layout and code improvements