added kivy and tidied up