Improve layout, remove unused variables