tyding up code and adding UIs elements