More functional tests (+ refactoring) and related HTML/CSS changes