Partially fixes #29. Will reopen when implementing chaining.
Improved result output
Made some minor changes to the when implementation. Closes #29.