Cleanup. Removed unused/rarely-used code