Refactor a few details