Add is_aligned and update tests and documentation