Unblock

Please comment and review.
Needs comment above each function explaining what it does and its purpose (above lines 52, 65, and anywhere else appropriate).