removed tabs, trailing whitespace, added licence