updated directions code.

refactored to make it cleaner.
directions update when moving.