cleanup

- drop not needed exports
- drop double mentioned keywords from man page
integrate tcget/setattr

- drop unneeded local variables
- some cleanup
- move initialization to ui_init()
- fix restoration of stdin behaviour