Fixed database connection problem.
Replaced hardcorded value by real database queries.
Fixed comments link.