Remove all layers on topic change

This replaces PR #357