Added optional dependencies in a way that the build does not break