Added comments + added some beautifications.