Config checking
Get metadata method
metadata objects
Initial version of refactoring
Use img onload
Small cleanup of code