main, utils: moved sunflower positioning code into function 'sunflower'