Fix locking, update packages, cleanup

- use randomCommand
- strip trailing period