Dirty version that kinda works

Rewritten DB communcation part, ui parts