WIP

Possibly narrowing down the db read/write problems.