Allowing strings for some inputs on text

Also writing mock object tests