add table element to demo, add minor bug fixes