Mainly leftover space removal + links-referrence input