Delete method of unused code and debug