Explicit pattern matching in 46.
Small cleanup in 46.
Removed unnecessary let bindings in 47.