Adding configurable web directory
Adding pgsql support and other minor changes
Removing comment to avoid pgsql error
Fixing pgsql naming problem

Also fixing other small issues/notices