Work in progress, changing code from an old module, to this..