Distributed

Distributed version. Now AP processes can be started in separate machines.