Improved the Element class so that it instead loads JSON files.