Changed consts to static. Tested memory leaks good.