refactor dashboard js into two classes