Finished upload class.
first fixes for utils.inc