Some more work on the demos
Change component layout code slightly to fix #212
Fix a regression in label positioning caused by my previous commit, and add unit test