Remove out of scope and buggy logic