Add comments to method declarations

Some methods are obvious, while others now have a better explanation of their inner workings.