Clean up codes, add comments and update READNE