Added some fixes for windows build where sizeof(long) is not necessarily sizeof(void*) and fixed CR remover.