Implement data alignment and padding