Add assertions and cross crate tests