More Clean it is

fixed unsigned int against int warnings
fixed typo in diamond noise that would cause a SIGSEGV
i cleaned up some stuffs too