Added documentation and a option to use a custom layout.