#115 fix bug in content layout, add assertions, doc