Added pitch limit detect, and small tweaks