Added licence headers and fixed a bug in properties