[COS] Arranged code a little