Move pitch into subpackage and add tests