Edited links and cleaned up code