Formatting
Move api to the bottom of the file
Allow null permission