Overhauled permissions checking system