First stages of tying events GUi with database