Changes to Trips to work with database

Revised control to work with database
changed html pages
added some unit tests