refactor menu rendering functions to use tiles template