Merged code from RB Station 1.