Fixed jump functions and added comments