Fixed layout bugs and added code for spinners