added generics and double linked list, sandboxing

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