Persist column size with localStorage. Various bug fixes

1) Persist column size with localStorage. 2) Fix [length-1] array
access. 3) Check object and function existence before usage