Creating and hiding the trap locking mechanism