Code cleanup. Remove some deadcode.