Improve margin / align processing