Added configuration for database tables and email

configuration sections added: db_tables and misc.
Added configurations details

db_tables and misc (for email)
Update the methods interacting with database

Using table names specified in the configuration file.
Correct one typo. (getAffiliation :P)