Cleaned up code

Removed bits of code here and there to make it look pretty. Also added
an output for the links that are returned.