Fixed references, added comments