Added additional unit tests and fixed an ongoing boolean restriction bug