Sqlite

This all needs to be cleaned up a bit. But I'd like someone else to take a look at it, as my Ruby skills are not so great.