Added the actual custom layout code
Added some documentation