Frames class refactored, app.config for database added