added clearlog
minor improvements
improved sanitization