code and layout formatting improvements