Code refactoring.
Fixed alignment of figure when centering unaligned image.