Remove unused fields and functions.

Fix for #639.