Add optional templates for shops. Fix some tests.