Improved testing and docs