Adding BSD licemse header as well as other comments.