Use enum/uint16_t for object types

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>