Update Bencode class to use class methods instead of instance methods