fixed weird nullpointer etc, structured strings, removed useless logging etc.