Fixed some issues, seperated metadata into a new file