Made the SDK simpler, kill off dead codes.