Fixed UI bugs.

Fixed some UI bugs. Number of slots in a line now adjusts according to
the size of the screen.