Adapted code for API v2 standards and 1.5

Style changes