SGUI stuff refactored maybe hopefully