Refactor all calls within an if, which is illegal
Merge pull request #20 from o11c/master

Refactor callfunc and callsub out of if statements