Reverted earlier split on genereateStatic function