Completed but untested implementation of filedb