Simplify do/end clauses
Add decode and encode tests for each type