Add information to README, add comments, improve variable names, replace int with size_t where appropriate