commit r002.

Cleaner code.
Better handling of iphone/ipad/mobile   media