small refactoring. error code 3 fix. pages added(search,upload).