Reworked some of the Bencode functionality to use case classes for better pattern matching. Still need to handle optionals though, in case of parse failure