More changes, added database wrapper, session wrapper. Modified the other class files as well.