A couple of light changes and introduce a new macro to simplify object prototype registration with the serialization system

Signed-off-by: MHesham <mhesham.fcis@gmail.com>