Updating due to dar SDK update

Fixed some depracated code.
Fixed some code that does not work anymore.
Commented code that breaks due to dart sdk bug.