Added BSD licence
Added BSD license and make code more readable (really?)

Signed-off-by: Karim Sallam <karim@github>