some cleanup and removal of old code

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