Initial ROGO port

Still needs lots of testing.