Added scroll pane and eliminated out of bounds exceptions