refactorings
refactoring ghosts, replays and stuff