Pure NAND implementation

I thought it would be cool to have all the other gates implemented in terms of only NAND gates. It's definitely slightly less readable, but reduces inter-gate dependencies. If you prefer the the current implementation I won't be bummed :)