Refactoring, restructuring unit tests and some CSS / HTML enhancements