Fixed failing tests and IM deprecated warnings