Refactor pitch creator

You're right, I accidentally counted one of the "ends" but I was mostly focusing on it since this commit is all about refactoring, looks good though now that I see that.