update

large update, cleaned up, got pid somewhat working