restruct links and layouts