Fixed class redefinition errors