Updating current code with Bay-Dev

I figured out how to do this, and I believe I did it properly.. Properly enough, at least.

May need to double-check the files.