Added License, readme,  a nim function, and some minor changes