Big update to PID, fixed nested/single

Works pretty well, is much more optimized than before