Fixed direct access permissions
Added settings page
Added extra defines