Small changes

Removed unnecessary casts, removed warnings