Separated function calls to main