Updated src code (now with comments)