Switched from is to == and fixed up some and/or's