[fix] code documentation, comments and cosmetic changes