added bug fix and clean code from un used metods
remove debug metods