Finish up SM3

Done!
OMG `if if let`. Can we please use less magic?