Adding missing header and safety tests