Fixed to work, tested all functions, seems to go dandily from what I can see.