Various fixes mostly in networking scirpt, introduction of power script