fix bug in link controller
add doc domain and clean up source