Remove obselete code and comments