Little refactors here and there