Changed the database connection methods a bit.  It is completely lazy and we only have to open/close when we need it and we don't have to initialize it to close it.

Some small search result tweaks as well.