Added a semimeasure implementation and improved the REPL.