Removed some DRY code.

Now code can be easily expanded in future by only adding new widget name to widgets array.
Merge pull request #1 from lukasz-zak/master

Removed some DRY code.