addex appendices environment, small changes to text, added few comments to code