Completed the homework, but the app have a few bugs in it.