Added some test cases for backend
Solve some warnings in the code