Some todos taken care of, bugfixes