fixes from review from adrian
reworked middleware ini dist file