Check for basestring instead of str, centralised test capabilities, added more examples