Small refactorings; compile against Cy 3.1