Final prototype code.