refactors wafel page and creates partial