Added a few fixes and TODOs