Cleaned comments and slight refactoring.