Fix missing classes issue on servers and optimised imports