Fixed some bugs. Reached a confusing one now. get_meta_data has some sort of scope issue. meta_data is not being saved.