Refactored entry creation code more