Fix bugs with parsing and added license head