[REFACTOR] Restructure CustomLayout to use HeaderFooterLayout instead of inheritance