moved all code into element, refactored styling
added comments
Merge branch 'refactoring-work'