Refactoring and documentation
Refactoring part 2
fixed rpc ports