Minor fixes to some Java errors and some validation on delete buttons