Mapo Search Work

-minor changes
-database work...
-created better sp to merge some tables