More functions implemented
Only few TODOs left