Organized ray.elm source

Organized and added comments to ray.elm.