Added methods to use Sistrix API

Fixes issue #88.

If my other PR is merged, you can cherrypick the relevant commits from this PR. Thanks!
switch the if else block

after an IF block that use return we don't need a else