uodate tests and some refactoring
refs #99