Finish cuda core part refactoring

May be remove dead code here.