[#547] Remove debug print statement
[#547] Remove extra unused code and fix core test bug