Remove a bunch of unused code.

Signed-off-by: Aron Cedercrantz <aron@cedercrantz.se>