Fixed comments and exceptions thrown.