Move interval macro into its own file
Move image stream fns into their own file, check argument
Move image util fns into their own file