Minor code restructuration