cleans up logging and ands regex support