Added unit tests; fixed parsing && ||