Initialization bugfix and marking functions static where appropriate

This fixes a bug where the user policy was left uninitialized if no policy script was provided.  This also markes some funcitons and globals as static where appropriate and removes the return type of add_new_irq() since nothing was using it.