Minor refactor + log