Add tests; fixed typos that showed as failures in test