clean up some code

Signed-off-by: Alexander Skjolden <alex@plastboks.net>