code refactor for UI,structure, modules. maked it more flexible