designed the details.hbs
added some databaseSetup validation
fixed the endkey problem