fix various bugs

• reload only if class has changed or the widget has not been loaded yet
• reload currently active tab on fill_data and reset loaded lists
• for better orientation move all fileuploads to its own function
• cleanup code