Extensive update to prepare

Added ME filter and split code

Not added job submissions yet.

Still to add PIRs