Add static initialisers, and make sure they work

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>