Added some comments, for-loopified copypaste code