If you ignore cash interest and dividends and AIM just the share price then the combined dividends and cash can act as a form of inflation offset. Perhaps best to keep the AIM aligned as-is (relative proportions of stocks, cash ...etc.), not adjusting either cash nor stock value for dividends, just keep a record of them separately and periodically add them into the AIM in the relevant proportions such that the AIM in effect remains unchanged.
When adding/removing, add (or take) proportional amounts to (from) stocks and to (from) cash, and increase (reduce) PC by the proportional amount of stock value added (removed).
i.e. if PC=12500, SV=15000, Cash=5000 and 6000 is being withdrawn
Take (6000 x ( 15000 / ( 15000 + 5000 ) ) ) = 4500 from stock
and the rest (6000 - 4500 = 1500) from cash
... and adjust PC by a factor of the new stock value divided by the old stock value = 12500 x 10500 / 15000 = 8750.
That keeps AIM the same other than the total amount of funds invested in the AIM and the number of shares held.
i.e. new PC=8750, SV=10500, Cash=3500 (each are 70% in this case of their prior values).
The same method can be applied as and when dividends are received. Combine that with cash interest received to date and apply that in the above manner. Again AIM will remain balanced as before, but have seen a increase in the total amount and number of shares held.
If for instance $100 of dividends and $30 of cash interest have been accumulated, then adding $130 to current AIM of
PC=8750, SV=10500, Cash=3500
adds 130 x ( 10500 / ( 10500 + 3500 ) ) = 97.50 to stock and the remainder 32.50 added to the AIM cash
... and adjust PC 8750 x 10597.5 / 10500 = 8831.25
New settings of PC=8831.25, SV=10597.50, Cash=3532.50
i.e. again they're all proportionately the same, each being 1.009286 times more than their previous values.