Added function anchor(), which makes the code more readable and flexible
Minor corrected comments
Somewhat simplified the code
Reduced some code