added uninstall section to Makefile
code cleanup
reverted changes; compile error
add FreeBSD support (but tty_lock is not supported)