Fixed time format, added file with license, refacored a little