Bugfixes in contrib/shell + added calculator example.