Moved database functions to programming mode. Fixed bug in set mode. Prepared loading screen