cleanup to remove some warnings
more thorough tests to close #369