Began work on MODE handler

I still need to research how this works a bit more.