Bug Fix

-Fix ghost getting caught in endless loop
-Better formatting