Improved const correctness in script
started working on runtime object reference debug.