most of the refactoring completed - tests to be added, functionality to be proven

- redesigned button class definitions
- small amends to the code
- started tidying up things