Tracing around networking and database. Cleaned up format.