Fixed inconsistent use of Postgres variables.
Changing libpqxx to optional.
Fixed indentation problems.