Fixed direction function, added some arrow drawing fancies