refactored spectre and ghost pathfind components into a single component