Some code cleanup and removal of defecting "ready" variable to enable building.

Also contains temporary fix of postgresql connection to 192.168.56.101 instead of localhost.