More refactor, move supporting stuff to glam object