Changed Database class and MainForm