added the cached function pattern that i use a lot. also updated model's validation function to return a hash connecting an array of errors to the field, instead of an array of errors for the whole model