minor fixes & refactors