Merge "Remove unused and incorrect code"