readded stuff taken out by a merge and removed unnecessary serialization fixes #341