Compilation Error Fixes
deleted unused Test class
Refactoring and fixed a Class cast Exception