Implemented support for new JSON format and dynamic sizing.
Implement simple popovers.

stolen from GitDiff :)
Lock while drawing.
Simplification.