Refactor pathData and instructions so that create() returns a pathData object (instructions object, respectively) which contains all other methods.