Refactor objects

I hope I haven't broken anything. Anyone wish to confirm this?
This is required by object_list_load (only afaik) consider making it the return value maybe. (0 for fail pointer for success)