Refactoring a bit of the foreground's html