Fixes #1201 Remove broken legacy code