Replace various find_by_... calls which are deprecated now.