restructure widget system