Cleanup from Haven Agency

I pulled your application down and was not able to use the application out of the box.  These are the changes I had to make to get them to work.  The change to bootstrap.php was to help the application run across different environments and directory locations.  The rest were bug fixes.  Let me know if you have any comments.