Remove unused functions and conditionals

Signed-off-by: Gawain Lynch <gawain.lynch@gmail.com>