Added logical functions and REPL.