Fixed bug due to renamed method
Added distinction (in comments) between instance and class attrs
Added function/class comments