Improves structure of API code