More Typecasting Stuff

use all C++ casts (with appropriate type)