better tests & cleanup