remove unused code

part of #843