refactor the ghostest app