Removed redundant code
Removed useless cast
Fixed incorrect category
Fixed decoding method to what it should be