Significantly simplify. Fix bug that could cause jitter in corners when moving multiple directions. Figure out what BLAH variable means.