A bit of reorganisation, also closes #1