General speed improvements. Pipeline refactored.