Some code and layout revisions