Proper instance verification
some general cleanup