Split into Broccolifile and Stirfryfile; improve API, error handling