Refectored patch
Added check for empty db
Removed not use browse.html and renamed the new one