This page contains a large amount of code. This should be moved to a dedicated code page, to make easier to download and view.