Assigment 2: refactor, add UI