Fixed some alignment and scalability issues.