Activity loop

NOTE: Bad hacking in margin directory list - need better fix for this