Simplified encoding/decoding process by removing unneeded semicolons from entity map

Also added to test to ensure that output is still consistent.