Replaced compile script with a smarter version,   added license and readme