I was a little frustrated at the lack of easy-to-understand implementations of AES on the web, so I wrote my own with help from Wikipedia and especially @samboy (Sam Trenholme). Thanks!
Please note that this is intended as a reference of sorts, not as a production-ready, fast and secure implementation. You probably shouldn't use this; use GPG instead.