Timeout subprocess

DO NOT MERGE, Needs to be rebased before merging

this PR depends on #45