Added `unique`, further size reduction

Added a very simple `unique` implementation. Also reduced size more by replacing the _b object with separate variables for each branch type.