changed ownership lrid column to be uuid, and changed unit tests to mock out database calls as sqllite does not cope with uuid columns
fixed merge issues