add reset
more cleanup
fixed reset
fixed int6 handling