Refactor code base and improve dashboard table