added initial layout elements and onclicklistener
created a new class and refactored some code