Added concept of orientation, deleted lots of redundant code, APPEARS to still work