Refs almost done, i just wander how to hell am i going to forbid infinit loops...