* Fix arrow heads positioning. * Addressed @foot's comment. * Beautified the code and added some comments.