cleanup code and fix compliation errors for other configs