Some CSS refactoring
JS refactoring