refactoring of keyboard controll of scenario editor
fixed next and previous commands to stop on boundries
fixed json creation
added dynamically created popups