Added extra check to ensure user has permission to edit
Split up enqueue sections and added init function
Removed curly bracket, fixing a syntax error