R4 working

r4 works, there might still be a few bugs that I'll clean up tonight.