Tidied Interval code and added pitchInterval function