SQL storage and stuff.
Remove unneeded types
Refactoring some of the types