catch signals ASAP
fix grabbing keys
less logging
simplified cleanup