Delete old code and fix bracketing error