Support short options

- handle some edge cases
- improve tests