Moved more callout positioning code into functions