Better structure, appears to be a bug with global and this