cosmetic changes
code style
cosmetic changes
reformatted
minor improvements
further simplifications
added nullable annotation
added todos for possible NPEs
fixed package name