search panel, database creation script, view separation and some code cleaning