Updated to use code from forks. REOL-28