License boilerplate
Simulator: Fix some warnings, remove dead code, and add documentation.