Changes to address @wasade comments.