Attempting to remove/fix unused/needed import declarations

Many import declarations are unused, some of them were added because needed (rebased on master #3416)