Added logging level preference; reworked trimming logic; renamed preferences