Partial shock code and warning fixes