Cleaned up imports and arguments for sqlite queries.