Some basics
Some test code
overflow protection and made method static
Display diff in preview