Remove most of the deprecated code

Closes GH #144