Correct user classes declaration/definition and serialization