I'm not home, so i cant test it, but i see the problem.
in the "GMS_COMMON" you do the following:
Public Sub Class_Globals
Public Root As B4XView
Public xui As XUI
Public MACHINE As B4XMainPage 'no don't do this
End Sub
You declare the B4XMainPage without ever assigning a value to it.
You can call the B4XMainPage simply following:
B4XPages.MainPage.SERIAL_NUMBER
Other pages, which are not the B4XMainPage, you can simply call like this:
B4XPages.MainPage.COMMON.SERIAL_NUMBER_Enterpressed