add unit tests
improve labeling
style fixes
small fixes
small fixes