Changed segment init to use function calls