<?php if ( comments_open() ) : ?>
<aside class="comment-container">
    <ol class="commentlist">
        <?php wp_list_comments(); ?>
    </ol><!-- ends commentlist -->
        <?php if ( is_single() && comments_open() ) { ?>
        <ul>
            <li><?php paginate_comments_links(); ?></li>
        </ul>
        <?php } ?>
        <?php comment_form(); ?>
</aside>
    <?php else : // comments are closed ?>
    <aside class="comment-container">
        <p class="nocomments">Comments are closed.</p>
    </aside>
<?php endif; ?>