Restructure code a bit

Mental stack overflow means we need more files!