Refactor Game Box with directive