Refactor data types