Fixed warnings and TODOs