Fix shell access and unit tests