Clean up assertion logic