broken implementation of equipment changing, cleaned up some other stuff