Removed unused header.
Removed unnecessary C++ style pointer casts when allocating memory.