Adding comments and cleanning out some code.