Setup data source

Code dump! Lots of random things in this dump.