Improved the bencoding and added some very simple tests (testing code is in much need of refactoring)