Remove unused code

Fixed #369