Large patch, including a lot of bug fixes, support for table layouts and some textual corrections