Adding comments, code clean up