Move main() to the head