ENH / STY: Refactor raw bti code

- add exceptions
- simplify data matching betwee PDF an config
- prepare for meaningful unit tests