Make expire optional and handle defaults properly