support for camilstore and webfist rels
moved some functions out to be more independant, and switched to error object instead of just a string
switched to error object instead of string, and code cleanup