Provide a setter for the parent

that way we do not have to check for the type before setting it
Removed useless commented code