clean up implicit declarations, clean deserialize