Some refactoring and flexibility of styling added