bugs fixed, code cleanup , comments ...

improved the speed of object to array conversiona and vice versa.