Fixed comments, merged with current code