It's a bit long, but the title sections should let you skip to the interesting bits.
Here's the latest code as well: https://github.com/skogsbrus/os