Issues #5, #6, #8.

Fixed these issues simply.