Remove useless lines.
Connection to database is done the latest we can