Rewritten checkInterface() function

Fixes #34