Got rid of all @SuppressWarnings("unchecked") by creating new message types for callback messages.