Added exceptions module.
Added rudimentary privelege checking.