Updated comments and added plugins code (commented).