Better plugin system, fixed media library issues reported so far, cleaning
up code.