Refactor dashboard