Added DB session opening and tables creation.