Fix errors, improve layout