[Issue #5] adding some more comments and correcting formatting