Some compilation fixes.
Merge pull request #2 from pozdnyakov/orientrefac

Some compilation fixes.