Refactor data interface