Clean platform code