Added prefix contains to prefix
Tidy up and fixed some warnings