use constants instead of hard-coded path to widgets
reformat the code