Code cleanup, remove dead and experimental code