php: refactor, ..

+file: mime preparation
+note: ui preparation