fix whitespace and coding style
resolve test errors
update naming of validated flag