initial commit
Add comments, minor fixes