More layout and some bug fixes.