Tweaks PID, merges code