Remove some unused and old code