Very buggy outline of Gem implementation