Add warning for missing effects and remove unused variable