Fixed some dangerous conditionals, cleared some TODOs