resync with justinsb repo
tests improvements