Add minimized version
Refactor fill until function