Fix random
Trim code & add license
Merge branch 'step-1' into step-2
Merge branch 'step-2' into step-3
Trim code & add license