Fixed edit so the blocks save on exit. Cleaned up the meta data code.