Refactoring for programmatic api

jspot's api is a bit inconsistent and badly organised at the moment. In its current state, it isn't easy to extend the api, especially to allow for generic extractors (#11), so this PR hopes to solve that.