Link card refactoring and code clean up

* Avoided code duplication for source and link card
* Added documentation for methods
* Misc code cleanup

Change-Id: Ia301d8d9ea239df4e213424afd35269164c90439