various improvements
possible npe
Merge pull request #8 from krasa/variousImprovements

Various improvements