Database refactor so that each session is closable
Remove old files