Added 'static' to internal functions