Added tests. Fixed static context reinitialization