Simplify code
Get rid of vector  and use aligned memory instead