Added alignment code - untested.