Move joins into separate files