Quick hack to make it work with ST3

*WORK IN PROGRESS*

I'm opening this pull request just to track the progress on this and get others to help test/review the code changes.

Barely tested, and shows the errors from Eclipse.

I'm new to Python so I'm definitely doing some things wrong here.
Feel free to comment.

The idea is to possibly make changes that make it backwards compatible with ST2?
Or this could be put into a separate ST3 branch.