Add assertion for buffer elements alignment
Add some tests for indices handling