Split code out into separate files