Starting work on a shell
Minor improvements to API