Fixes possible NullPointer at OfflineUser
Fixes Material being case sensitive
Refractoring and bugfixes