How to create and manage custom table layouts