Added initial restrictions
Fixed a bug
Merge pull request #1 from adamjodonnell/restrictions

Bug fixes and restriction keys.
Missed commits
Merge pull request #2 from adamjodonnell/restrictions

Missed commits