Fixed a lot layout exceptions and alignment problems