Add copyright, tweak comments

Also changed switch case to avoid implementation errors from going
silent.