Refactor and style dashboard