Some bug fixes and crash preventions and trying out IntelliJ's NotNull & Nullable annotations.