Removed some temporary functions and cleaned up in features.