Db dev 02

(Not ready to merge)
I have added some handling for tube types and for querying database for files based on tube types.
Feel free to explore, but I will plan on (documenting this better and) merging this and developing it further after incorporating the IO branch.