Merged adrian's changes and fixed small UI stuff