Refactored BEncoding

* Moved Expect to an extension method.
* Three more unit tests.
* Refactored Decode and added a switch-block.