refactoring and optimizing code for version 2
modified bug fix for hopperminecarts
V2 updates for Lockette