Remove compiler warnings, initialize pointers at zero and use unsigned
int where necessary