Fix classical trailed password problem: add string trimmers everywhere. Clean up.