A few layout and code fixes