Added initial support for scoped locks (might change) (will probably change)
Note: write tests for locking mechanisms