remove unnecessary castings. proper (newer) annotations import
remove unnecessary castings and initializations. small general code refactoring