removed db folder (for now at least) and improved clean function