Fixed more bugs
Improved type proofment
Everything works, except updating