Rearrange collections and models code into one file.