Cleaned up and organized the ApiFileGenerationTask