Added README, LICENSE and fixed a bug.