Fixes some tests and deprecation warnings
Removes useless require