Made all functions static, except for main()