Added compass & sprite support
code refactoring