Added support and optimization (see note)

- hexadecimal support
- error catching support
- cathode/anode optimization