Added algorithm to generate stable ViewContext id

Fixed #2