Copied files from RJObject sinewave example