U: refactor and fix style