Jsep candidate handling.

Can I suggest you refactor these with constants?