Moved init function to a separate static class.