Now with less crashing due to NullPointers. Hopefully.