Added basic locking mechanism and a few other usability enhancements; removed unneccessary permissions checks