Adding comments, bug fixes