Fixed bug, improved ui

- bug introduced with decoding off by 1
- starting to sort out ui a bit