Added licencing and some comments