Refactored the Gate class: removed the fill and empty methods.