Worked on making the integer type the represenation of JSON types. Also,
created a freeID() function that tries to avoid mem leaks