Much more idiomatic pattern matching thanks to guys on HN.

Conflicts:
	crypto.rs