With errors but working! Need to rewrite #process and #theme functions from file field module.