clean up and add .gitignore
Fix null pointer exception when no component is selected
Merge pull request #2 from alexyida/master

Trivial changes