Some refactor, fixed links